#include "element.h"
#ifndef TABLE_HASHAGE_H_INCLUDED
#define TABLE_HASHAGE_H_INCLUDED

//Etat de la cellule.
typedef enum { VIDE = 0, LIBERER = 1, OCCUPER = 2 } ETAT;


struct TableHashage {
	int tailleMaximum;
	Element * element;
	ETAT * etat;
};

void initTabHash(TableHashage &maTable, int tailleMaximum);
int hash(TableHashage maTable, Element elem, int (*table_hash)(Element, int));
void ajouterTabHash(Element elementAajouter, TableHashage &maTable, int (*table_hash)(Element, int), int (*table_rehash)(TableHashage, int, Element)); //Table_hash = Fonction de hashage
void displayTabHash(void (*table_display_elt)(TableHashage));
void testamentTabHash(TableHashage &maTable);
int rechercheTabHash(TableHashage maTable, Element e, ElementComp comp, int (*table_recherche)(TableHashage, Element, ElementComp));

//////////////////////////////
//PERSONNE
/////////////////////////////

int hashPersonne(Element p, int taille);
int reHashPersonne(TableHashage maTable, int indexDuTableau, Element p);
int recherchePersonneTabHash(TableHashage maTable, Element personneAtrouver, ElementComp comp);

#endif // TABLE_HASHAGE_H_INCLUDED
